package com.bndg.blackjack

import android.os.Parcel
import android.os.Parcelable

/**
 * @author r
 * @date 2024/10/12
 * @description Card
 * @param suit 花色
 * @param rank 牌面
 * @param isFaceDown 是否翻面
 */

data class Card(val suit: String, val rank: String, var isFaceDown: Boolean = false) {
    fun value(): Int {
        return when (rank) {
            "A" -> 11 // A可以算作11或1，根据情况
            "K", "Q", "J" -> 10
            else -> rank.toInt()
        }
    }
}